#!/usr/local/bin/python
# -*- coding: utf-8 -*-

from flask import Flask, url_for, request, session, jsonify, render_template, redirect

from bompy import app
from utils import get2parameters

@app.route('/')
@get2parameters
def start_screen(Language=None):
    if Language:
        session['Language'] = Language
        session['Usercode'] = 1
        
    if session.has_key('Language'):
        return """
        Choose an action: <br />
        <a href= design>Edit design</a> <br />
        <a href= bom>Edit BOM</a> <br />
        <a href= addstock>Add stock</a> <br />
        <a href= viewstock>View stock</a> <br />
        <a href= refer>Add refer</a> <br />
        <a href= domovement>Make a movement </a> <br />
        <a href= viewmovements>View movements </a> <br />
        <a href= loadproduction>Load production file </a> <br />
        <a href= viewproduction>View production </a> <br />
        <a href= vieworders>View orders </a> <br />
        """
    else:
        return """
        elija el lenguage <br />
        select the language <br />
        <a href=?Language=Spanish> Spanish</a> <br />
        <a href=?Language=English> English</a>
        """

